package com.jinlia.show.modules.system.controller.common;

import com.jinlia.show.modules.base.constant.i.IBaseEnum;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 枚举选项
 */
@RestController
@RequestMapping("options")
public class BaseEnumOptionsController {

    /**
     * name向后端获取
     *
     * @param name
     * @return
     * @throws ClassNotFoundException
     */
    @GetMapping("{name}")
    public List download(@PathVariable("name") String name) throws ClassNotFoundException {
        return IBaseEnum.getList(name);
    }
}
